package com.fzb.forum4j.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fzb.forum4j.dao.api.ICommentDao;
import com.fzb.forum4j.po.Article;
import com.fzb.forum4j.po.Blog;
import com.fzb.forum4j.po.Comment;
import com.fzb.forum4j.po.QueryMode;
import com.fzb.forum4j.service.api.ICommentService;
@Service("commentServiceImpl")

public class CommentServiceImpl extends BaseServiceImpl<Comment> implements
		ICommentService {

	@Resource(name="commentDaoImpl")
	private ICommentDao commentDao;
 
	@Override
	public void getCommentsByCid(QueryMode<Article> qmd) {
		 commentDao.getCommentsByCid(qmd);
		
	}

	@Override
	public void getBlogCommentsByCid(QueryMode<Blog> qmd) {
		 commentDao.getBlogCommentsByCid(qmd);
		
	}
	@Override
	public void getList(QueryMode<Comment> qmd) {
		if(qmd.get_search()){
			commentDao.getListByFilters(qmd);
			return;
		}
		commentDao.getList(qmd);
	}


}
